#include <stdio.h>
int main(){
	int x,y,a,b,c,d;
	scanf("%d%d",&x,&y);
	a=x/10;
	b=x%10;
	c=y/10;
	d=y%10;
	if(x==y){
	printf("100");
	return 0;
	}
	if(a==d&&(b==c)){
	printf("20");
	return 0;
	}
	else if(a==d||(a==c)||(b==c)||(b==d)){
	printf("2");
	}
	else 
	printf("0");
	return 0;
}

